import utils from './utils'
import Cnode from './Cnode'

export default class Celem extends Cnode{
    constructor(){
        super()
        utils.define(this, {
            style: {},
            computed: {},
            points: [],
            center: []
        }, {readonly: true})
        utils.define(this, {
            parent: null
        }, {
            watch: true
        })
        utils.define(this, {
            id: '',
            className: ''
        })
    }
    appendChild(child){
		let args = arguments
		for(let i=0, len=args.length; i<len; i++){
			child = args[i]
			if(child instanceof Cnode) {
				if(child.parentNode) child.parentNode.removeChild(child)
				this.children.push(child[i])
			}
		}
	}
}